Did anyone try converting JAVA code in to DXL DOORS

I want a utility that converts my JAVA Code in to DXL before executing it with DXL Server Engine.

I would like to have a JAR with DOORS DXL API that can be imported in to JAVA. Is something like this possible at the first place?

Will there be a JAVA Programming support for DOORS in future?

Kiran,
General Electric
SystemAdmin - Tue Mar 16 11:41:17 EDT 2010

Re: Did anyone try converting JAVA code in to DXL DOORS
Mathias Mamsch - Wed Mar 17 14:04:58 EDT 2010

Obviously something like a Java->DXL converter is not possible. Java has so many features that DXL does not have, these are so different languages, that to even think about the existence of a tool like that.

BUT: It is indeed possible to control DOORS from a java application! Many commercial applications do it this way (TPE, Sodius DXL Editor, etc.). The problem is, that the only interface to DOORS is the COM api, which does NOT expose the DXL api, but only gives you the possibility to run DXL code in your DOORS session.

You can write yourself a (or buy a commercial) Java to DOORS "bridge", which will execute commands in DOORS for you using COM. I am not a big java programmer, but a DOORS bridge would basically create DXL code, run it in DOORS, marshal the result back using a string and convert it back a Java data. I am not a big java programmer, but it would probably look something like the example below.

Regards, Mathias
 

class DOORSObject { // wrap a DOORS object
// ...
// ... lots of stuff goes here 
// ...
}
 
DOORSObject DOORSObject::createBelowObject (DOORSObject x) {
        int oNr    = x.AbsoluteNumber;       
        string strDxl = "Object x = create below object( " + oNr.ToString() +  " ); setOleResult x.AAbsNo \"\""
        com.DOORS.runDXL strDXL
        int newObjectNr = com.DOORS.getOleResult().ToInt()
        DOORSObject result = new DOORSObject(newObjectNr);
        return (result);
}

Re: Did anyone try converting JAVA code in to DXL DOORS
Mathias Mamsch - Wed Mar 17 14:08:08 EDT 2010

Mathias Mamsch - Wed Mar 17 14:04:58 EDT 2010

Obviously something like a Java->DXL converter is not possible. Java has so many features that DXL does not have, these are so different languages, that to even think about the existence of a tool like that.

BUT: It is indeed possible to control DOORS from a java application! Many commercial applications do it this way (TPE, Sodius DXL Editor, etc.). The problem is, that the only interface to DOORS is the COM api, which does NOT expose the DXL api, but only gives you the possibility to run DXL code in your DOORS session.

You can write yourself a (or buy a commercial) Java to DOORS "bridge", which will execute commands in DOORS for you using COM. I am not a big java programmer, but a DOORS bridge would basically create DXL code, run it in DOORS, marshal the result back using a string and convert it back a Java data. I am not a big java programmer, but it would probably look something like the example below.

Regards, Mathias
 

class DOORSObject { // wrap a DOORS object
// ...
// ... lots of stuff goes here 
// ...
}
 
DOORSObject DOORSObject::createBelowObject (DOORSObject x) {
        int oNr    = x.AbsoluteNumber;       
        string strDxl = "Object x = create below object( " + oNr.ToString() +  " ); setOleResult x.AAbsNo \"\""
        com.DOORS.runDXL strDXL
        int newObjectNr = com.DOORS.getOleResult().ToInt()
        DOORSObject result = new DOORSObject(newObjectNr);
        return (result);
}

By the way, the company Sodius sells a commercial Java to DOORS bridge called MDWorkbench, I guess. So no need to write your own :-)

Regards, Mathias